import request from '@/utils/request'

// 查询村列表
export function listVillage(query) {
  return request({
    url: '/his/village/list',
    method: 'get',
    params: query
  })
}

// 查询村详细
export function getVillage(code) {
  return request({
    url: '/his/village/' + code,
    method: 'get'
  })
}

// 新增村
export function addVillage(data) {
  return request({
    url: '/his/village',
    method: 'post',
    data: data
  })
}

// 修改村
export function updateVillage(data) {
  return request({
    url: '/his/village',
    method: 'put',
    data: data
  })
}

// 删除村
export function delVillage(code) {
  return request({
    url: '/his/village/' + code,
    method: 'delete'
  })
}

// 导出村
export function exportVillage(query) {
  return request({
    url: '/his/village/export',
    method: 'get',
    params: query
  })
}
